import {defineStore} from "pinia";
import {ref} from "vue";

export const useRoleInfoStore = defineStore('roleInfo', () => {
    let roleDataList = ref([])
    let roleSearchData = ref({});
    let addOrUpdateDialog = ref(false);
    let roleDeleteDialog = ref(false);

    function resetRoleDataList(info) {
        roleDataList.value = info;
    }

    function resetRoleSearchData(info) {
        roleSearchData.value = info;
    }

    function resetAddOrUpdateDialog(flag) {
        addOrUpdateDialog.value = flag;
    }

    function resetRoleDeleteDialog(flag) {
        roleDeleteDialog.value = flag;
    }

    return { roleDataList, resetRoleDataList, roleSearchData, resetRoleSearchData, addOrUpdateDialog, resetAddOrUpdateDialog, roleDeleteDialog, resetRoleDeleteDialog }
})